//
//  WMPurchaseTool.h
//  WonderPurchaseSDK
//
//  Created by zero on 2021/7/20.
//

#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface WMPurchaseTool : NSObject

+ (instancetype)sharedTool;


/// 检查本地未上传的订单
/// @param block 状态回调
- (void)checkUserDefaultsHaveNoUploadOrderWithBlock:(void(^)(BOOL status, NSString *msg, NSDictionary *localOrder))block;


/// 发起内购
/// @param product 商品
/// @param handle 状态回调
- (void)addPaymentWithProduct:(SKProduct *)product OrderNo:(NSString *)orderNo StatusHandle:(void(^)(BOOL status, NSString *msg))handle;


/// 恢复购买
/// @param handle 状态回调
- (void)restoreTransactionsOnSuccess:(void (^)(BOOL status, NSString *msg, NSArray *transactions))handle;




@end

NS_ASSUME_NONNULL_END
